import { defineStore } from 'pinia';
import { reactive } from 'vue';
import { routes } from '@/router/routes.ts';
import type { RouteRecordRaw } from 'vue-router';

export const routerStore = defineStore('routerStore', () => {

  const menuRouters = reactive<RouteRecordRaw[]>(routes[0].children ?? []);
  const allRouters = reactive<RouteRecordRaw[]>(routes);

  return { menuRouters, allRouters };
});
